home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / ODF Release 3 / ODFDev / ODF / Found / FWCollec / SLCollec.cpp < prev    next >
Encoding:
Text File  |  1996-12-16  |  2.4 KB  |  91 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                SLCollec.cpp
  4. //    Release Version:    $ ODF 3 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #include "FWFound.hpp"
  11.  
  12. #ifndef SLCOLLEC_H
  13. #include "SLCollec.h"
  14. #endif
  15.  
  16. #ifndef FWODEXCE_H
  17. #include "FWODExce.h"
  18. #endif
  19.  
  20. #ifndef PRLIST_H
  21. #include "PRList.h"
  22. #endif
  23.  
  24. #ifndef PRORDCOL_H
  25. #include "PROrdCol.h"
  26. #endif
  27.  
  28. //========================================================================================
  29. // FW_CPrivLink
  30. //========================================================================================
  31.  
  32. #ifdef FW_BUILD_MAC
  33. #pragma segment fwcollec
  34. #endif
  35.  
  36. //========================================================================================
  37. // Global functions
  38. //========================================================================================
  39.  
  40. //----------------------------------------------------------------------------------------
  41. // FW_PrivNewLinkedList
  42. //----------------------------------------------------------------------------------------
  43.  
  44. FW_HLinkedList FW_PrivNewLinkedList(FW_PlatformError* error)
  45. {
  46.     FW_ERR_TRY
  47.     {
  48.         return new FW_CPrivLinkedList();
  49.     }
  50.     FW_ERR_CATCH
  51.     return NULL;
  52. }
  53.  
  54. //----------------------------------------------------------------------------------------
  55. // FW_PrivDeleteLinkedList
  56. //----------------------------------------------------------------------------------------
  57.  
  58. void FW_PrivDeleteLinkedList(FW_HLinkedList list)
  59. {
  60.     // No try block necessary - Do not throw
  61.     if (list)
  62.     {
  63.         FW_PrivOrderedCollection_RemoveAll(list);
  64.         delete list;
  65.     }
  66. }
  67.  
  68. //----------------------------------------------------------------------------------------
  69. // FW_PrivNewLinkedListIterator
  70. //----------------------------------------------------------------------------------------
  71.  
  72. FW_HLinkedListIterator FW_PrivNewLinkedListIterator(FW_HLinkedList list, FW_PlatformError* error)
  73. {
  74.     FW_ERR_TRY
  75.     {
  76.         return new FW_CPrivLinkedListIterator(list);
  77.     }
  78.     FW_ERR_CATCH
  79.     return NULL;
  80. }
  81.  
  82. //----------------------------------------------------------------------------------------
  83. // FW_PrivDeleteLinkedListIterator
  84. //----------------------------------------------------------------------------------------
  85.  
  86. void FW_PrivDeleteLinkedListIterator(FW_HLinkedListIterator iterator)
  87. {
  88.     // No try block necessary - Do not throw
  89.     delete iterator;
  90. }
  91.